<?php
require_once 'dbConnect.php';

$name = $_GET['name'];
if ($name == null) {
	echo "ERROR:未接收到参数";
}
$sql = "SELECT * FROM `user` WHERE `name`=:name";
try{
	$stmt = $pdo->prepare($sql);
	$stmt->bindParam(':name', $name);
	$stmt->execute();
	
	echo $stmt->rowCount();
}
catch (PDOException $e){
	echo $e->getMessage();
}
